| Conditions | 3 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | var express = require('express'); |
||
| 38 | function reportedit(res, body) { |
||
| 39 | const week = body.week; |
||
| 40 | const text = body.text; |
||
| 41 | |||
| 42 | db.run("UPDATE reports SET text = '" + text + "' WHERE week = " + week, |
||
| 43 | (err) => { |
||
| 44 | if (err) { |
||
| 45 | // console.log(err); |
||
| 46 | } |
||
| 47 | return res.status(201).json({ |
||
| 48 | data: { |
||
| 49 | message: "Report successfully updated." |
||
| 50 | } |
||
| 51 | }); |
||
| 52 | }); |
||
| 53 | } |
||
| 54 | |||
| 56 |